import operator

xtuple = [(11, 'Apple'), (8, 'Army'), (2, 'Japan'), (99, 'CCP')]

print(xtuple)
xtuple.sort(key=operator.itemgetter(0))
print(xtuple)
xtuple.sort(key=lambda x: x[1])
print(xtuple)

xtuple.sort(key=operator.itemgetter(0))
print(xtuple)

xtuple.sort(key=operator.itemgetter(1))
print(xtuple)
